Semi-autonomous myoelectric control algorithm